<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{$current['title']}- {$Think.CONFIG.sitename}</title>
    <link href="__PUBLIC__/static/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="__PUBLIC__/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/static/css/plugins/fullcalendar/fullcalendar.css" rel="stylesheet">
    <link href="__PUBLIC__/static/css/plugins/fullcalendar/fullcalendar.print.css" rel="stylesheet">
    <link href="__PUBLIC__/static/css/animate.min.css" rel="stylesheet">
    <include file="Public/commoncss" />
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/static/js/plugins/fancybox/jquery.fancybox.css">

</head>

<body class="gray-bg top-navigation">
<div id="wrapper">
    <div id="page-wrapper" class="gray-bg">
        <div class="row border-bottom white-bg">
            <include file="Public/header" />
        </div>
        <div class="wrapper wrapper-content">
            <div class="row animated fadeInDown">
                <div class="col-sm-3">
                    <div class="ibox float-e-margins">
                        <include file="Public/sidenav" />
                    </div>
                </div>
                <div class="col-sm-9 animated fadeInRight">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>我的待办 </h5>
                        </div>
                        <div class="ibox-content">
                            <div id="calendar"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <include file="Public/footer" />
    </div>
</div>
<include file="Public/commonjs" />
<script src="__PUBLIC__/static/js/bootstrap.min.js?v=3.3.5"></script>
<script src="__PUBLIC__/static/js/content.min.js?v=1.0.0"></script>
<script src="__PUBLIC__/static/js/jquery-ui.custom.min.js"></script>
<script src="__PUBLIC__/static/js/plugins/fullcalendar/fullcalendar.min.js"></script>
<script src='__PUBLIC__/static/js/plugins/fancybox/jquery.fancybox.js'></script>

<script>
    $(document).ready(function() {
        $('#calendar').fullCalendar({
            header: {
                left: 'prev,next today',
                center: 'title',
                right: 'month,agendaWeek,agendaDay'
            },
            events: '{:U('json')}',
            dayClick: function(date, allDay, jsEvent, view) {
                var selDate =$.fullCalendar.formatDate(date,'yyyy-MM-dd');
                $.fancybox({
                    'type':'ajax',
                    'href':'{:U('event')}?action=add&date='+selDate
                });
            },
            eventClick: function(calEvent, jsEvent, view) {
                $.fancybox({
                    'type':'ajax',
                    'href':'{:U('event')}'+'?action=edit&id='+calEvent.id
                });
            }
        });

    });
</script>

</body>

</html>